import React from 'react';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import Home from './pages/Home';
import TechFrontier from './pages/TechFrontier';
import AppArena from './pages/AppArena';
import Insight from './pages/Insight';
import Search from './pages/Search';
import NewsDetail from './pages/Detail/NewsDetail';
import TopicDetail from './pages/Detail/TopicDetail';
import EditorDetail from './pages/Detail/EditorDetail';
import HotDetail from './pages/Detail/HotDetail';
import './App.css';

const App: React.FC = () => {
  return (
    <Router>
      <Routes>
        <Route path="/" element={<Home />} />
        <Route path="/tech" element={<TechFrontier />} />
        <Route path="/app" element={<AppArena />} />
        <Route path="/insight" element={<Insight />} />
        <Route path="/search" element={<Search />} />
        <Route path="/news/:id" element={<NewsDetail />} />
        <Route path="/topic/:id" element={<TopicDetail />} />
        <Route path="/editor/:id" element={<EditorDetail />} />
        <Route path="/hot/:cat/:idx" element={<HotDetail />} />
        <Route path="/learn" element={<div>学习资源</div>} />
      </Routes>
    </Router>
  );
};

export default App;
